<template>
  <div style="width:200px">
    
      <el-menu router :default-active="this.$route.path" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse">
        <div ></div>
       
        <el-submenu index="1" v-if='$role.AC_501 || $role.VD_1401 || $role.RM_901 || $role.BN_101 || $role.KW_301'>
          <template slot="title"><i class="el-icon-pan_icon"></i>内容管理</template>
          <!-- <el-menu-item-group>
            <el-menu-item index="/Home/Article"  v-if="$role.AC_501">
              <span slot="title" style="padding-right:10px" >文章管理</span>
            </el-menu-item>
          </el-menu-item-group> -->

          <el-menu-item-group>
            <el-menu-item index="/Home/Video" v-if="$role.VD_1401">
              <span slot="title" >视频管理</span>
            </el-menu-item>
          </el-menu-item-group>

          <!-- <el-menu-item-group>
             <el-menu-item index="/Home/Recommend" v-if="$role.RM_901">
              <span slot="title" >推荐管理</span>
            </el-menu-item>
          </el-menu-item-group> -->

          <el-menu-item-group>
            <el-menu-item index="/Home/Banner" v-if="$role.BN_101">
              <span slot="title" style="padding-right:10px" >Banner管理</span>
            </el-menu-item>
          </el-menu-item-group>

          <el-menu-item-group>
             <el-menu-item index="/Home/Keyword" v-if="$role.KW_301">
              <span slot="title" >搜索管理</span>
            </el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
             <el-menu-item index="/Home/Mark">
              <span slot="title" >标签管理</span>
            </el-menu-item>
          </el-menu-item-group>

        </el-submenu>

         <el-submenu index="2" v-if="$role.DN_201 || $role.CM_1201 || $role.PB_1001 || $role.PB_RP_1101 || $role.MS_FB_701 || $role.MS_RP_801">
          <template slot="title"><i class="el-icon-funnel"></i>审核管理</template>           
           <el-menu-item-group>
            <el-menu-item  index="/Home/Dynamic" v-if="$role.DN_201">
              <span slot="title" >动态管理</span>
            </el-menu-item>
          </el-menu-item-group>
          
          <el-menu-item-group>
            <el-menu-item  index="/Home/comment" v-if="$role.CM_1201">
              <span slot="title" >评论管理</span>
            </el-menu-item>
          </el-menu-item-group>

          <!-- <el-menu-item-group>
            <el-menu-item index="/Home/Question"  v-if="$role.PB_1001">
              <span slot="title" >问题管理</span>
            </el-menu-item>
          </el-menu-item-group>
          <el-menu-item-group>
            <el-menu-item index="/Home/Reply" v-if="$role.PB_RP_1101"> 
              <span slot="title" >回答管理</span>
            </el-menu-item>
          </el-menu-item-group> -->
           
          <el-menu-item-group>
              <el-menu-item index="/Home/Opinion" v-if="$role.MS_FB_701">
                <span slot="title" >意见反馈</span>
              </el-menu-item>
           </el-menu-item-group>
           <el-menu-item-group>
              <el-menu-item index="/Home/Report" v-if="$role.MS_RP_801">
                <span slot="title" >举报管理</span>
              </el-menu-item>
           </el-menu-item-group>
         </el-submenu>

        <el-submenu index="3" v-if="$role.MSG_PS_1801">
          <template slot='title'><i class="el-icon-view"></i>推送管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/Push" v-if="$role.MSG_PS_1801">
              <span slot="title" >推送管理</span>
            </el-menu-item>
            <el-menu-item index="/Home/version">
              <span slot="title">版本控制</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>

        <el-submenu index="4" v-if="$role.UR_1301 || $role.MG_401 ||$role.RL_1601">
          <template slot='title'><i class="el-icon-Group-"></i>账号管理</template>
          <el-menu-item-group>
              <el-menu-item index="/Home/User" v-if="$role.UR_1301">
                <span slot="title" >用户信息</span>
              </el-menu-item>
              <el-menu-item index="/Home/Useradmin" v-if="$role.MG_401">
                <span slot="title" >账号管理</span>
              </el-menu-item>
              <el-menu-item index="/Home/Role" v-if="$role.RL_1601">
                <span slot="title" >角色管理</span>
              </el-menu-item>
          </el-menu-item-group>
          
        </el-submenu>

         <!-- <el-submenu index="5" v-if="$role.HPT_AC_1706 || $role.HPT_AC_1706">
          <template slot='title'><img class="navIcon" src="../assets/images/huojian.png" alt="">活动管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/Activitylist" v-if="$role.HPT_AC_1706">
              <span slot="title">活动列表</span>
            </el-menu-item>
            <el-menu-item index="/Home/ActivitySeach" v-if="$role.HPT_AC_1706">
              <span slot="title" >活动审核</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>

        <el-submenu index="6" v-if="$role.HPT_ID_1701 || $role.HPT_IF_1702 || $role.HPT_CERT_1703">
          <template slot='title' ><i class="el-icon-circle-plus-outline"></i>医院管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/Hospital" v-if="$role.HPT_ID_1701">
              <span slot="title" >医院账号</span>
            </el-menu-item>
            <el-menu-item index="/Home/Information" v-if="$role.HPT_IF_1702">
              <span slot="title" >医院审核</span>
            </el-menu-item>
            <el-menu-item index="/Home/Attest" v-if="$role.HPT_CERT_1703">
              <span slot="title" >认证审核</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>

         <el-submenu index="7" v-if="$role.HPT_DT_1704 || $role.HPT_DT_1704">
          <template slot='title' ><i class="el-icon-yonghu-doct"></i>医生管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/DoctorsList" v-if="$role.HPT_DT_1704">
              <span slot="title">医生列表</span>
            </el-menu-item>
            <el-menu-item index="/Home/DoctorsSeach" v-if="$role.HPT_DT_1704" >
              <span slot="title" >医生审核</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>

        <el-submenu index="8" v-if="$role.HPT_RR_1705">
          <template slot='title' ><i class="el-icon-haofangtuo400iconfont2yiyuan"></i>预约管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/Reserve"  v-if="$role.HPT_RR_1705">
              <span slot="title" >预约列表</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>   

       <el-submenu index="9" v-if="$role.HPT_RR_1705">
          <template slot='title' ><i class="el-icon-haofangtuo400iconfont2yiyuan"></i>商品管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/CommoReview">
              <span slot="title" >商品审核</span>
            </el-menu-item>
            <el-menu-item index="/Home/CommoList">
              <span slot="title" >商品列表</span>
            </el-menu-item>
            <el-menu-item index="/Home/CommoType">
              <span slot="title" >类别管理</span>
            </el-menu-item>
            <el-menu-item index="/Home/CommoLable">
              <span slot="title" >商品标签</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu>  

        <el-submenu index="10">
          <template slot='title' ><i class="el-icon-haofangtuo400iconfont2yiyuan"></i>财务管理</template>
          <el-menu-item-group>
            <el-menu-item index="/Home/Refund">
              <span slot="title" >退款审核</span>
            </el-menu-item>
            <el-menu-item index="/Home/RunningWater">
              <span slot="title" >流水记录</span>
            </el-menu-item>
            <el-menu-item index="/Home/BuyAnnal">
              <span slot="title" >订单管理</span>
            </el-menu-item>
            <el-menu-item index="/Home/HospitalOver">
              <span slot="title" >商家余额</span>
            </el-menu-item>
            <el-menu-item index="/Home/HospitalRebate">
              <span slot="title" >商家返点</span>
            </el-menu-item>
            <el-menu-item index="/Home/DynamicRebate">
              <span slot="title" >动态返点</span>
            </el-menu-item>
           </el-menu-item-group>
        </el-submenu> -->
        
    </el-menu>
  </div>
</template>
<script>
export default {
  data(){
    return {
      $role:'',
    }
  },
  props:{
    isCollapse:{
      default:false
    }
  },
  created(){
    this.$role = JSON.parse(sessionStorage.getItem('userSolt'))
  },
  methods: {
    handleOpen(key, keyPath) {
      
    },
    handleClose(key, keyPath) {
      
    }
  }
}
</script>
<style>
.el-menu--collapse{
  width:54px
}
.navIcon{
  width:18px;
  margin-left:2px;
  margin-right:9px
}
</style>


